<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<title></title>
		<link rel="stylesheet" href="css/font.css" />
		<link rel="stylesheet" href="css/common.css" />
				<link rel="stylesheet" href="css/policy.css" />
		<script type="text/javascript">
			document.addEventListener('plusready', function() {
				//console.log("所有plus api都应该在此事件发生后调用，否则会出现plus is undefined。"

			});
		</script>

	</head>
	<body>
		<header class=" header-module ">
			<div class="flex-justify-align header-top">
				<a href="home.html" class="iconfont iconfanhuijiantou header-back"></a>
				<p class="header-title">政企通 - 政策指南</p>
				<span class="header-span"></span>
			</div>
		
		</header>
		<article class="middle-moudle">
			<section class="loans-data" id="loans-data">
			
			</section>
		</article>
		<footer class="footer-module">
			<nav class="flex-justify-align footer-nav ">
				<a href="home.html" >
					<span class="iconfont iconshouye"></span><p>首页</p>
				</a>
				<a href="apply.html" >
					<span class="iconfont icontibao"></span><p>提报</p>
				</a>
				<a href="setting.html">
					<span class="iconfont iconwode"></span><p>我的</p>
				</a>
			</nav>
		</footer>
	</body>
	
	<script src="js/jquery-3.0.0.min.js"></script>  
	<script src="js/gloab.js"></script>
	
	<script>   
		$(function () {
			loadData();
		});
		
		function loadData(){
					$.ajax({    
						//请求方式    
						type:"GET",    
						//文件位置    
						url:basePath+"app/tcompany/getPolicy",  
						data: "",
						//返回数据格式为json,也可以是其他格式如    
						dataType: "json",    
						//请求成功拼接html    
						success: function(data){
							console.log(data)
							var list = data.list;
							var str="";    
							$.each(list,function(i,n){    
								str+='<a href="pages/policy/detail.html?id='+list[i].id+'" class="flex-justify-align base-interval loans-item">';
								//str+='	<img src="img/loans/loans-data-type.png" />';
								str+='	<div class="loans-info">';
								str+='		<p>'+list[i].title+'</p>';
								str+='		<span>时间：'+list[i].createTime+'</span>';
								str+='	</div>';
								str+='	<span class="iconfont iconback"></span>';
								str+='</a>';
							});   
							$("#loans-data").append(str); 
						}    
					}); 
		}	
	</script>
</html>
